﻿<Page x:Class="RM.WinClient.CandidateList"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:datagrid="http://schemas.microsoft.com/wpf/2008/toolkit"
        xmlns:CustomWindow="clr-namespace:RM.WinClient"
    Height="1000" Width="1060" >
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Themes\DataGrid.Generic.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>

    <Grid x:Name="GridCandidateDetails" MinHeight="500" Width="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" ShowGridLines="False">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid x:Name="gridCandidateList" Margin="17,0,0,0" Width="1000" Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="20*"/>
                <RowDefinition Height="80*"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Margin="10,0,0,0" Grid.Row="0">
                <Label x:Name="lblNameSearch" Height="31" FontSize="16"  HorizontalAlignment="Left" Margin="20,3,0,2" VerticalAlignment="Center" Width="78" Content="Search"/>
                <TextBox Name="txtSearch" Width="150" Height="25" TextChanged="txtSearch_TextChanged"></TextBox>

            </StackPanel>
            <datagrid:DataGrid x:Name="dataGrid" ItemsSource="{Binding}" Loaded="dataGrid_Loaded" CanUserResizeRows="False" AreRowDetailsFrozen="True" CanUserResizeColumns="False" Background="Transparent" AlternatingRowBackground="#d3d3d3" GridLinesVisibility="All" VerticalAlignment="Top" Height="487" 
                           Margin="20,4,0,0" MinColumnWidth="10" Grid.Row="1" 
                           IsReadOnly="True" AutoGenerateColumns="False">
                <datagrid:DataGrid.RowBackground>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#fcfcfd" Offset="0.015" />
                        <GradientStop Color="#f5f6f9" Offset="0.375" />
                        <GradientStop Color="#edf0f5" Offset="0.6" />
                        <GradientStop Color="#e3e6eb" Offset="1" />
                    </LinearGradientBrush>
                </datagrid:DataGrid.RowBackground>
                <datagrid:DataGrid.Columns>
                    <datagrid:DataGridHyperlinkColumn Header="FirstName" Binding="{Binding FirstName}" >
                        <datagrid:DataGridHyperlinkColumn.ElementStyle>
                            <Style TargetType="TextBlock">
                                <EventSetter Event="Hyperlink.Click" Handler="OnHyperlinkClick" />
                                <Setter Property="Tag" Value="{Binding Id}"></Setter>
                            </Style>
                        </datagrid:DataGridHyperlinkColumn.ElementStyle>
                    </datagrid:DataGridHyperlinkColumn>
                    
                    <datagrid:DataGridTextColumn Header="Last Name" Binding="{Binding LastName}" >
                    </datagrid:DataGridTextColumn>
                    <datagrid:DataGridTextColumn Header="Email Address" Binding="{Binding EmailAddress}"></datagrid:DataGridTextColumn>
                    <datagrid:DataGridTemplateColumn Header="View Resume">
                        <datagrid:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Button Content="View Resume" Tag="{Binding Id}" Click="ViewResume_Click">
                                    <Button.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="DarkGray" Offset="0"/>
                                            <GradientStop Color="LightGray" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Button.Background>
                                </Button>
                            </DataTemplate>
                        </datagrid:DataGridTemplateColumn.CellTemplate>
                    </datagrid:DataGridTemplateColumn>
                </datagrid:DataGrid.Columns>
                <datagrid:DataGrid.RowDetailsTemplate>
                    <DataTemplate>
                        <StackPanel Background="LightBlue">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="This item has details." />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding FirstName}" />
                                <TextBlock Text=" " />
                                <TextBlock Text="{Binding LastName}" />
                            </StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </datagrid:DataGrid.RowDetailsTemplate>
            </datagrid:DataGrid>
            <ProgressBar x:Name="progressBar" Height="20" Margin="366,183,366,0" VerticalAlignment="Top" Grid.Row="1" IsIndeterminate="True"/>
        </Grid>
        <Grid Grid.Row="1" HorizontalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Height="25" Width="150" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Content="Select Question Set:" x:Name="lblQuestionSet" FontSize="13.333"/>
            <ComboBox Height="22" Width="150" Grid.Row="0" Grid.Column="1" DisplayMemberPath="Name" HorizontalAlignment="Left" Text="Select Question Set" x:Name="cmbQuestionSets" >
            </ComboBox>
            <Button Content="Start Test>>" Name="btnNext" Click="btnStart_Click" Width="150" Height="25" Grid.Row="1" HorizontalAlignment="Right" Grid.ColumnSpan="2" >
                <Button.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="DarkGray" Offset="0"/>
                        <GradientStop Color="LightGray" Offset="1"/>
                    </LinearGradientBrush>
                </Button.Background>
            </Button>
        </Grid>
    </Grid>


</Page>
